home *** CD-ROM | disk | FTP | other *** search
- Program Demo12;
-
- { SPX library - font demo Copyright 1994 Scott D. Ramsay }
-
- Uses spx_vga,spx_sfn,spx_lib;
-
- var
- lib : pSpxLib;
- dac : rgblist;
- font1,
- font2,
- font3 : sfn_type;
- begin
- openmode(1);
- { open an archive file that has some fonts }
- lib := new(pSpxLib,init('fonts.spl',true));
-
- { load up a palette }
- loadcolors('demo12.col',dac);
- fsetcolors(dac);
-
- { load some fonts from the archive }
- LoadSfnLib(lib,'scifi.sfn',font1);
- LoadSfnLib(lib,'west.sfn',font2);
-
- { load a font from disk }
- LoadSfn('mono8.sfn',font3);
-
- putletter(10,10,55,'This is the default font');
- SetSfn(font1);
- putletter(10,18,24,'This is scifi font');
- printletter(10,28,'This is scifi font using it''s colors');
- SetSfn(font2);
- putletter(10,40,55,'This is west font');
- putletter(10,50,65,'This is west font');
- SetSfn(font3);
- putletter(10,100,100,'This font is MONO8');
- readln;
- FreeSfn(font1);
- FreeSfn(font2);
- FreeSfn(font3);
- dispose(lib,done);
- closemode;
- end.
-